# -*- coding: utf-8 -*-
from z3c.pt.pagetemplate import ViewPageTemplateFile
from zope.dublincore.interfaces import IZopeDublinCore

from pargo.interfaces import IContent
from pargo.utils import pretty_title_or_id
from pargo.viewlet.viewlet import PageTemplateViewlet


class ContentSummaryViewlet(PageTemplateViewlet):
    """
    Summary of content.
    """
    template = ViewPageTemplateFile('templates/summary.pt')

    def get_metadata(self):
        """
        Extract metadata form DublinCore adapter.
        """
        return IZopeDublinCore(self.context)
